<template>
  <div class="Movie">
    <!-- this.$route为路由的参数对象 -->
    <!-- this.$router为路由的导航对象 -->
    <h2>Movie组件---{{this.$route.params.mid}}--{{mid}}</h2>

    <hr>

    <button @click="showThis">打印this</button>
    <button @click="$router.forward()">前进一层</button>
    <button @click="$router.back()">后退一层</button>
  </div>

</template>

<script>
export default {
  // 接收props的值
  props: ['mid'],
  methods: {
    showThis () {
      console.log(this)
    }
  }
}
</script>

<style>
.Movie{
  height: 250px;
  background-color: blueviolet;
}
</style>
